#include <bits/stdc++.h>

using namespace std;

int main_129()
{
    int n,m,v;
    scanf("%d%d",&n,&m);
    int vertex[n]={0};
    m*=2;
    for (size_t i=0;i<m ;++i )
    {
        scanf("%d",&v);
        ++vertex[v];
    }
    --n;
    for (size_t i=0;i<n ;++i )
    {
        printf("%d ",vertex[i]);
    }
    printf("%d",vertex[n]);
    return 0;
}
